package com.pacy.pacybaseproject.viewmodels;

import android.app.Application;

import androidx.annotation.NonNull;

import com.pacy.pacybaseproject.adapters.BusStationAdapter;
import com.pacy.pacybaseproject.beans.BusStationBean;
import com.pacy.pacybaseproject.utils.Constants;

import java.util.ArrayList;
import java.util.List;

import me.goldze.mvvmhabit.base.BaseViewModel;

/**
 * @author PACY
 * @date 2023/12/26
 * description:
 */
public class BusMapViewModel extends BaseViewModel {
    public BusStationAdapter busStationAdapter;

    public BusMapViewModel(@NonNull Application application) {
        super(application);
    }

    @Override
    protected void init() {
        super.init();
        initAdapter();
    }

    private void initAdapter(){
        busStationAdapter=new BusStationAdapter();
        List<BusStationBean> datas=new ArrayList<>();

        BusStationBean busStationBean1=new BusStationBean();
        busStationBean1.setName("西务站");
        busStationBean1.setLenth("200");
        List<BusStationBean.StationDTO> stationDTOS=new ArrayList<>();
        stationDTOS.add(new BusStationBean.StationDTO("7路","5分钟","2站","隆福寺"));
        stationDTOS.add(new BusStationBean.StationDTO("39路","19分钟","8站","市民服务中心东门"));
        busStationBean1.setStation(stationDTOS);
        datas.add(busStationBean1);


        BusStationBean busStationBean2=new BusStationBean();
        busStationBean2.setName("市信访局站");
        busStationBean2.setLenth("328");
        List<BusStationBean.StationDTO> stationDTOS2=new ArrayList<>();
        stationDTOS2.add(new BusStationBean.StationDTO("35路","11分钟","6站","廊坊站"));
        stationDTOS2.add(new BusStationBean.StationDTO("11路","14分钟","9站","中建机械南门"));
        busStationBean2.setStation(stationDTOS2);
        datas.add(busStationBean2);

        busStationAdapter.setNewInstance(datas);
    }



}
